package com.zf.yichat.service;

import com.zf.yichat.dto.StTicketDto;
import com.zf.yichat.dto.TicketMarketDto;
import com.zf.yichat.model.StUserTicket;
import com.zf.yichat.utils.response.FsResponse;

import java.math.BigDecimal;
import java.util.List;

public interface TicketsService {

    /**
     * 注册赠送用户门票
     * @param userId
     * @return
     */
    int giveUserTickets(Long userId);

    /**
     * 查询用户门票列表
     * @param userId
     * @return
     */
    List<StUserTicket> queryUserTickets(Long userId, Integer status);

    /**
     * 激活门票
     * @param ticketCode
     * @return
     */
    FsResponse activateUserTickets(Long adminUserId, String ticketCode, Long userId);

    /**
     * 用户扫描官方邀请码赠送门票
     * @param userId
     * @param ticketCode
     * @return
     */
    FsResponse officialInvitationTickets(Long userId, String ticketCode);

    /**
     * 查询指定官方码扫码详情
     * @param ticketCode
     * @return
     */
    List<StTicketDto> queryUserScanCode(String ticketCode);

    /**
     * 查询门票市场列表
     * @return
     */
    List<TicketMarketDto> queryTicketMarketList(Integer showType, Long userId) throws Exception;

    /**
     * 门票上架接口
     * @param ticketPrice
     * @param ticketTitle
     * @return
     */
    FsResponse ticketListing(Long userId, Integer ticketId, BigDecimal ticketPrice, String ticketTitle);

    /**
     * 用于编辑市场门票信息
     * @param marketId
     * @param ticketPrice
     * @param ticketTitle
     * @param ticketStatus
     * @return
     */
    FsResponse ticketEdit(Integer marketId, BigDecimal ticketPrice, String ticketTitle, Integer ticketStatus);

    /**
     * 门票购买接口
     * @param userId
     * @param ownerId
     * @param marketId
     * @return
     */
    FsResponse ticketPurchase(Long userId, String ownerId, Integer marketId);

    /**
     * 门票记录接口-已购买，已出售
     * @param userId
     * @param pageNo
     * @param pageSize
     * @return
     */
    FsResponse ticketRecord(Long userId, Integer recordStatus, Integer pageNo, Integer pageSize) throws Exception;
}
